home *** CD-ROM | disk | FTP | other *** search
- /* HiRes Picture Display
- ** ---------------------
- ** Opens a screen of 640 pixels width in HIRES mode. You can even try
- ** SuperHiRes (SHIRES) if you change the appropriate flag in the GameScreen
- ** structure.
- */
-
- MODULE 'dpkernel','gms/dpkernel','graphics/pictures','files/files'
- MODULE 'screens','system/register','system/modules','graphics/screens'
-
- PROC main()
- DEF screen:PTR TO screen, pic:PTR TO picture
- DEF picfile:filename, scrmodule:PTR TO module
-
- picfile := [ ID_FILENAME, 'GMS:demos/data/PIC.Pic640x256']:filename
-
- IF dpkbase := OpenLibrary('GMS:libs/dpkernel.library',0)
- SetUserPrefs(0)
-
- IF (scrmodule := Init([TAGS_MODULE,NIL,
- MODA_NUMBER, MOD_SCREENS,
- MODA_TABLETYPE, JMP_AMIGAE,
- TAGEND], NIL))
-
- scrbase := scrmodule.modbase
-
- IF (screen := Init([TAGS_SCREEN,0,
- GSA_SCRWIDTH, 640,
- GSA_SCRHEIGHT, 256,
- GSA_PLANES, 4,
- GSA_SCRMODE, HIRES,
- TAGEND],NIL))
-
- IF (pic := Init([TAGS_PICTURE,0,
- PCA_DATA, screen.memptr1,
- PCA_WIDTH, 640,
- PCA_HEIGHT, 256,
- PCA_PLANES, 4,
- PCA_SCRMODE, screen.scrmode,
- PCA_SCRTYPE, screen.scrtype,
- PCA_OPTIONS, GETPALETTE,
- PCA_FILE, picfile,
- TAGEND],NIL))
-
- screen.palette := pic.palette
- UpdatePalette(screen)
- Display(screen)
- WaitLMB()
- Free(pic)
- ENDIF
- Free(screen)
- ENDIF
- Free(scrmodule)
- ENDIF
- CloseDPK()
- ENDIF
- ENDPROC
-
-